﻿using Inaction.Rule;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Inaction.Service.Client.Proxy
{
    public static class ProxyFactory
    {
        public static void InitProxy()
        {
            switch (AppConfig.Instance.ServiceType)
            {
                case ServiceType.Remoting:
                    Inaction.Proxy.Instance = new RemotingProxy();
                    break;
                case ServiceType.WcfService:
                    Inaction.Proxy.Instance = new WcfServiceProxy();
                    break;
                case ServiceType.WebService:
                    Inaction.Proxy.Instance = new WebServiceProxy();
                    break;
                case ServiceType.Local:
                    Inaction.Proxy.Instance = new Inaction.ServiceProxy.LocalProxy();
                    break;
                default:
                    new AppConfigForm().ShowDialog();
                    return;
            }
        }
    }
}
